home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / Xt / XtSetArg.z / XtSetArg
Encoding:
Text File  |  2002-10-03  |  3.9 KB  |  133 lines

  1.  
  2.  
  3.  
  4.      XXXXttttSSSSeeeettttAAAArrrrgggg((((3333XXXXtttt))))      XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....6666))))       XXXXttttSSSSeeeettttAAAArrrrgggg((((3333XXXXtttt))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.           XtSetArg, XtMergeArgLists - set and merge ArgLists
  10.  
  11.      SSSSYYYYNNNNTTTTAAAAXXXX
  12.           XtSetArg(_a_r_g, _n_a_m_e, _v_a_l_u_e)
  13.                 Arg _a_r_g;
  14.                 String _n_a_m_e;
  15.                 XtArgVal _v_a_l_u_e;
  16.  
  17.           ArgList XtMergeArgLists(_a_r_g_s_1, _n_u_m__a_r_g_s_1, _a_r_g_s_2, _n_u_m__a_r_g_s_2)
  18.                ArgList _a_r_g_s_1;
  19.                Cardinal _n_u_m__a_r_g_s_1;
  20.                ArgList _a_r_g_s_2;
  21.                Cardinal _n_u_m__a_r_g_s_2;
  22.  
  23.      AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  24.           _a_r_g       Specifies the name-value pair to set.
  25.  
  26.           _a_r_g_s_1     Specifies the first _A_r_g_L_i_s_t.
  27.  
  28.           _a_r_g_s_2     Specifies the second _A_r_g_L_i_s_t.
  29.  
  30.           _n_u_m__a_r_g_s_1 Specifies the number of arguments in the first
  31.                     argument list.
  32.  
  33.           _n_u_m__a_r_g_s_2 Specifies the number of arguments in the second
  34.                     argument list.
  35.  
  36.           _n_a_m_e      Specifies the name of the resource.
  37.  
  38.           _v_a_l_u_e     Specifies the value of the resource if it will fit
  39.                     in an _X_t_A_r_g_V_a_l or the address.
  40.  
  41.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  42.           The _X_t_S_e_t_A_r_g function is usually used in a highly stylized
  43.           manner to minimize the probability of making a mistake; for
  44.           example:
  45.  
  46.           Arg args[20];
  47.           int n;
  48.  
  49.           n = 0;
  50.           XtSetArg(args[n], XtNheight, 100);n++;
  51.           XtSetArg(args[n], XtNwidth, 200);n++;
  52.           XtSetValues(widget, args, n);
  53.  
  54.           Alternatively, an application can statically declare the
  55.           argument list and use _X_t_N_u_m_b_e_r:
  56.  
  57.           static Args args[] = {
  58.                {XtNheight, (XtArgVal) 100},
  59.                {XtNwidth, (XtArgVal) 200},
  60.  
  61.  
  62.  
  63.      Page 1                                          (printed 10/3/02)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      XXXXttttSSSSeeeettttAAAArrrrgggg((((3333XXXXtttt))))      XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....6666))))       XXXXttttSSSSeeeettttAAAArrrrgggg((((3333XXXXtttt))))
  71.  
  72.  
  73.  
  74.           };
  75.           XtSetValues(Widget, args, XtNumber(args));
  76.  
  77.           Note that you should not use auto-increment or auto-
  78.           decrement within the first argument to _X_t_S_e_t_A_r_g.  _X_t_S_e_t_A_r_g
  79.           can be implemented as a macro that dereferences the first
  80.           argument twice.
  81.  
  82.           The _X_t_M_e_r_g_e_A_r_g_L_i_s_t_s function allocates enough storage to
  83.           hold the combined _A_r_g_L_i_s_t structures and copies them into
  84.           it.  Note that it does not check for duplicate entries.
  85.           When it is no longer needed, free the returned storage by
  86.           using _X_t_F_r_e_e.
  87.  
  88.      SSSSEEEEEEEE AAAALLLLSSSSOOOO
  89.           XtOffset(3Xt)
  90.           _X _T_o_o_l_k_i_t _I_n_t_r_i_n_s_i_c_s - _C _L_a_n_g_u_a_g_e _I_n_t_e_r_f_a_c_e
  91.           _X_l_i_b - _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.      Page 2                                          (printed 10/3/02)
  130.  
  131.  
  132.  
  133.